import re, os
str = "钟山风雨起苍黄，百万雄师过大江。虎踞龙盘今胜昔，天翻地覆慨而慷。宜将剩勇追穷寇，不可沽名学霸王。天若有情天亦老，人间正道是沧桑。"

r = re.split(r"，|。", str)
# print(r)
f = open('七律.txt', 'a',encoding='UTF-8')

for s in r:
    print(s)
    if s != "":
        f.write(s+'\n')

f.close()
